package com.ruoyi.cms.dto;

import com.ruoyi.cms.domain.CmsCategory;

import java.util.ArrayList;
import java.util.List;

public class CmsCategoryDto extends CmsCategory {
    // 子分类列表
    private List<CmsCategoryDto> children;

    // 构造函数
    public CmsCategoryDto() {
        super();
    }

    // 从 CmsCategory 转换为 CmsCategoryDto
    public CmsCategoryDto(CmsCategory category) {

        this.children = new ArrayList<>();
    }

    // getter 和 setter
    public List<CmsCategoryDto> getChildren() {
        return children;
    }

    public void setChildren(List<CmsCategoryDto> children) {
        this.children = children;
    }
}
